@echo off 
chcp 65001 > nul
rem 设置UTF-8编码格式
setlocal enabledelayedexpansion
set str1=nothing to commit, working tree clean
set filepath=%CD%

echo 检查本地存档
cd /d %filepath%\pk2.2\Koei\San11\SaveData
rem 存档文件夹
for /F "delims=" %%i in ('git status') do (
	if "%%i"=="%str1%" (
		set flag=1
		echo set flag=!flag!
	) 
)
if defined flag (
	echo 更新存档
    git pull
) else (
	git add .
	git commit -m "%date:~3,10% %time:~0,8%"
	git push	
)


echo 更新成功
cd /d %filepath%\pk2.2
rem 启动程序文件夹

echo 启动游戏
start Launcher.exe
rem pause

